#ifndef __COLORB__
#define __COLORB__

#ifndef byte
typedef unsigned char byte;
#endif

/// <summary>
/// Defines an RGBA, 32-bit color. Each element is a byte (valued 0 - 255, inclusive).
/// </summary>
struct Colorb
{
public:
	static const Colorb White;

	/// <summary>The red component of this color.</summary>
	byte R;
	/// <summary>The green component of this color.</summary>
	byte G;
	/// <summary>The blue component of this color.</summary>
	byte B;
	/// <summary>The alpha component of this color.</summary>
	byte A;

	/// <summary>
	/// Initializes a new instance of the <see cref="Colorb" /> struct.
	/// </summary>
	Colorb()
	{
	};

	/// <summary>
	/// Initializes a new instance of the <see cref="Colorb" /> struct.
	/// </summary>
	/// <param name="r">The red value.</param>
	/// <param name="g">The green value.</param>
	/// <param name="b">The blue value.</param>
	/// <param name="a">The alpha value.</param>
	Colorb(const byte &r, const byte &g, const byte &b, const byte &a) :
		R(r),
		G(g),
		B(b),
		A(a)
	{
	}

	/// <summary>
	/// Initializes a new instance of the <see cref="Colorb" /> struct.
	/// </summary>
	/// <param name="color">The color to copy from.</param>
	Colorb(const Colorb &color) :
		R(color.R),
		G(color.G),
		B(color.B),
		A(color.A)
	{
	}

	Colorb &operator*=(const float &v)
	{
		R *= v;
		G *= v;
		B *= v;
	
		return *this;
	}
};
#endif